﻿using System;
using System.Windows;
using StepsManagerLibrary.Enum;
using StepsManagerLibrary.Interfaces;

namespace WPF_Example.Helpers
{
    public class MessageBoxObserver : StepsManagerLibrary.Interfaces.IObserver<StepControlStateEnum>
    {
        private readonly IStepControl _control;

        public MessageBoxObserver(IStepControl control)
        {
            _control = control;
        }

        public void Notify(StepControlStateEnum notification)
        {
            if (notification == StepControlStateEnum.Selected)
            {
                MessageBox.Show(String.Format("{0} has been selected!", _control.Title));
            }
        }
    }
}
